asm
  ld sp,$43FF
  end asm

#include "./library/smsrnd.bas"
#include "./library/charmap01b.zxi"

dim eee as uinteger at $4010
dim seed as uinteger at $4012
dim ee2 as uinteger at $4014
dim ex1 as uinteger at $4016
dim ex2 as uinteger at $4018
dim ex3 as uinteger at $401A
dim ex4 as uinteger at $401C
dim ej0 as uinteger at $4020
dim ej1 as uinteger at $4022
dim eex as uinteger at $4024
dim eey as uinteger at $4026

sub stratovoxputchar(txpos as uinteger,typos as uinteger, tchr as uinteger,taddr as uinteger)
  dim tp1 as uinteger at $4000
  dim tp2 as uinteger at $4002
  for tp1=0 to 1
    for tp2=0 to 7
      poke ($8000+((txpos band 31)*512)+(tp2*64)+((typos band 31)*2)+tp1) bxor 63,peek(taddr+((7-tp2)*2)+tp1+(tchr*16))
      next:next
  end sub

seed=0

for ex3=0 to 31
  for ex1=0 to 31
    stratovoxputchar(ex1,ex3,2,@charmap01b)
    next:next

for ex3=0 to 15
  for ex1=0 to 15
    'for ee2=1 to 100:next
    stratovoxputchar(ex1+14,ex3+14,(ex3*16)+ex1,@charmap01b)
    next:next

eex=4:eey=4

eee=0
do
  ej0=peek($5000)
  ej1=peek($5800)
  stratovoxputchar(8,25,48+(ej0 mod 10),@charmap01b)
  stratovoxputchar(7,25,48+((int(ej0/10)) mod 10),@charmap01b)
  stratovoxputchar(6,25,48+((int(ej0/100)) mod 10),@charmap01b)
  stratovoxputchar(8,26,48+(ej1 mod 10),@charmap01b)
  stratovoxputchar(7,26,48+((int(ej1/10)) mod 10),@charmap01b)
  stratovoxputchar(6,26,48+((int(ej1/100)) mod 10),@charmap01b)

  if (ej0 band 1)<>0 then:eex=eex+1:end if
  if (ej0 band 2)<>0 then:eex=eex-1:end if
  if (ej1 band 1)<>0 then:eey=eey+1:end if
  if (ej1 band 2)<>0 then:eey=eey-1:end if

  stratovoxputchar(eex,eey,eee band 255,@charmap01b)
  eee=eee+1
  loop

do:loop

'-------------------------------------------------------------------------------


